package com.ai.spring.common.enums;

import lombok.Getter;

/**
 * 结果返回码
 *
 * @author 石头
 * @Date 2019/10/28
 * @Version 1.0
 **/
@Getter
public enum ResponseCodeEnum {
    /**成功*/
    SUCCESS_CODE(1,"成功"),
    /**成功*/
    ERROR_CODE(0,"失败"),
    ERROR_UPLOAD(30001,"图片上传失败"),
    ERROR_UPLOAD_MAX(30002,"图片上传失败,单图片文件太大"),
    ERROR_UPLOAD_TMAX(30003,"图片上传失败,总图片文件太大"),
    ERROR_UPLOAD_TYPE(30004,"图片上传失败,图片类型不允许"),

    PARAM_ERROR(20001,"系统错误:服务调用接口参数不能为空"),
    SERVICE_ID_ERROR(20002,"服务ID不存在"),
    SERVICE_METHOD_ERROR(20003,"服务方法不存在"),
    SERVICE_ERROR(20004,"服务调用失败"),
    SERVICE_RTN_TYPE_ERROR(20005,"服务方法返回类型不正确"),
    ERROR_500(20006,"服务接口异常"),
    ;
    private Integer code;
    private String name;
    ResponseCodeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
}
